package com.s59.players.service.impl;

import com.s59.players.entity.Players;
import com.s59.players.mapper.PlayMapper;
import com.s59.players.service.PlayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class PlayServiceImpl implements PlayService {
    @Resource
    private PlayMapper playMapper;

    @Override
    public List<Players> getAll(String pname, Long cid) {
        return playMapper.getAll(pname, cid);
    }

    @Override
    public int delete(Long pid) {
        return playMapper.delete(pid);
    }

    @Override
    public int insert(Players players) {
        return playMapper.add(players);
    }

    @Override
    public Players get(Long pid) {
        return playMapper.get(pid);
    }

    @Override
    public int update(Players players) {
        return playMapper.update(players);
    }
}
